<?php

/**
 *  @FileComment            [文件注释内容模板]
 *  @ProjectName             项目名称：shopFrame
 *  @FileName                   文件名称：UserEditModel.class.php
 *  @Author                       yuerengui <596580041@qq.com>
 *  @Date                          2014-10-22 0:48:41
 *  *
 */
class UserEditModel extends Model {

        public $table = 'user';
        public $validate = array(
            array('nickname', 'nonull', '姓名不能为空', 2, 3),
            array('email', 'nonull', '邮箱不能为空', 2, 3),
            array('email', 'email', '邮箱格式不正确', 2, 3),
            array('address', 'nonull', '详细地址不能为空', 2, 3),
            array('tel', 'nonull', '手机号不能为空', 2, 3),
            array('tel', 'phone', '手机号格式不正确', 2, 3),
            array('linetel', 'nonull', '固话不能为空', 2, 3),
            array('linetel', 'tel', '固话格式不正确', 2, 3)
        );

        public function get_one_data($uid) {
                return $this->where(array('uid' => $uid))->find();
        }

        public function edit_data($uid) {
                return $this->where(array('uid' => $uid))->update();
        }

}
